%%
%1
A = rand(4,5);

for i = 1:size(A,1)
    for j = 1:size(A,2)
        if A(i,j)<0.5
            A(i,j) = 2;
        end
    end
end
%disp(A)
%%
%2
clc,clear

A = ones(9,9);
A2 = diag(A,1)
C = 2*ones(9,9);
C2 = diag(C);
B1 = diag(A2,1);
B2 = diag(A2,-1);
B3 = diag(C2,0);
B = B1+B3+B2
det(B)

%%
%3
clc,clear
syms k n x
s1 = symsum(k.^5,k,0,n);
s2 = symsum((((-1).^k)*x.^(2*k+1))./factorial(2*k+1),k,0,inf);
s3 = symsum(((-1).^(k+1))./4.^k*k,k,1,inf)
%%
%4


%%
%5
clc
clear
syms x
A = int(exp(-x.^2/2),x,-inf,0);
B = int(nthroot(1+2*(sin(x)).^2,2),x,0,pi);
C = int(sin(x)./(1-x.^2).^0.5,x,0,1)
%%
%6
clc
clear
syms x t n k
B1 = limit((x.^2-int(cos(t.^2),t,0,x.^2))/sin(x.^10),x,0)
B2 = limit(((factorial(n)).^2/(n.^(2*n))).^(1/n),n,inf)
B3 = limit(((2*pi*n).^0.5*n.^n)./(factorial(n)*exp(n)),n,inf)
B4 = limit(symsum(n.^k/k,k,0,n)/exp(n),n,inf)

%%
%
syms z
a =linspace(-9,9,40);
b = linspace(-9,9,30);
[x,y] = meshgrid(a,b);
fimplicit3(x.^2/3-y.^2/5+x.*y-z)
